<?php 
  if($this->pageCount){
  	?>
    <div class="paginationControl">
      <?php 
        if(isset($this->first)){
        	echo '<a href="' . $this->url(array('page' => $this->first)) . '">Primeiro</a>';
        }
        else{
        	echo '<span class="pagination-disabled">Primeiro</span>';
        }
        
        if (isset($this->previous)){
          echo '<a href="' . $this->url(array('page' => $this->previous)) . '">Anterior</a>';
        }
        else{
          echo '<span class="pagination-disabled">Anterior</span>'; 
        }  
        foreach($this->pagesInRange as $page){
          if($page != $this->current){
            echo'<a href="' . $this->url(array('page' => $page)) . '">' . $page. '</a>';
          }
          else{ 
          	echo '<span class="pagination-disabled">' . $page . '</span>';
          }  
        } 
        if(isset($this->next)){
          echo"<a href='" . $this->url(array('page' => $this->next)) . "'>Próximo</a>";
        }
        else{ 
          echo '<span class="pagination-disabled">Próximo</span>';
        }
        if(isset($this->last)){
          echo"<a href='" . $this->url(array('page' => $this->last)) . "'>Último</a>";
        }
        else{ 
          echo '<span class="disabled">Último</span>';
        } 
      ?>
    </div>
    <?php 
  }
?>
